Skip to content

crypto: reject inherited key type names#62875

Merged
nodejs-github-bot merged 3 commits intonodejs:mainfrom
JonathanLopes404:fix/issue-62874
Apr 23, 2026
Merged

crypto: reject inherited key type names#62875
nodejs-github-bot merged 3 commits intonodejs:mainfrom
JonathanLopes404:fix/issue-62874

Conversation

@JonathanLopes404
Copy link
Copy Markdown
Contributor

Use an own-property check when dispatching generateKeyPair's NID-only algorithm table

Fixes: #62874

Use an own-property check when dispatching generateKeyPair's NID-only
algorithm table

Fixes: nodejs#62874
Signed-off-by: Jonathan Lopes <jonathan15989@protonmail.com>
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/crypto

@nodejs-github-bot nodejs-github-bot added crypto Issues and PRs related to the crypto subsystem. needs-ci PRs that need a full CI run. labels Apr 21, 2026
@ChALkeR ChALkeR requested a review from panva April 21, 2026 16:18
Copy link
Copy Markdown
Member

@panva panva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thank you. Maybe we could use a SafeMap instead? Alternatively (and that's probably better), just add __proto__: null to nidOnlyKeyPairs

@JonathanLopes404
Copy link
Copy Markdown
Contributor Author

Sure, I'll change it and send it right away.

Signed-off-by: Jonathan Lopes <jonathan15989@protonmail.com>
@panva panva added the commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. label Apr 21, 2026
@addaleax addaleax added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Apr 21, 2026
@panva panva removed request-ci Add this label to start a Jenkins CI on a PR. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. labels Apr 21, 2026
Signed-off-by: Jonathan Lopes <jonathan15989@protonmail.com>
@panva panva added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Apr 21, 2026
@panva
Copy link
Copy Markdown
Member

panva commented Apr 21, 2026

Thank you for the quick turnaround @JonathanLopes404

@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 21, 2026
@nodejs-github-bot

This comment was marked as outdated.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

βœ… All modified and coverable lines are covered by tests.
βœ… Project coverage is 89.62%. Comparing base (b2248fd) to head (1704281).
⚠️ Report is 26 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #62875      +/-   ##
==========================================
+ Coverage   89.61%   89.62%   +0.01%     
==========================================
  Files         706      706              
  Lines      219144   219145       +1     
  Branches    41985    41981       -4     
==========================================
+ Hits       196391   196417      +26     
- Misses      14629    14636       +7     
+ Partials     8124     8092      -32     
Files with missing lines Coverage Ξ”
lib/internal/crypto/keygen.js 93.02% <100.00%> (+0.01%) ⬆️

... and 42 files with indirect coverage changes

πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • πŸ“¦ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@panva panva added the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 21, 2026
@panva
Copy link
Copy Markdown
Member

panva commented Apr 21, 2026

@JonathanLopes404 thank you for the contribution, since we now have a passing GHA as well as Jenkins CI and two collaborator βœ… I've applied commit-queue Add this label to land a pull request using GitHub Actions. . Barring any objections the change lands automatically when open for at least 48 hours now.

@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Apr 23, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/62875
βœ”  Done loading data for nodejs/node/pull/62875
----------------------------------- PR info ------------------------------------
Title      crypto: reject inherited key type names (#62875)
   ⚠  Could not retrieve the email or name of the PR author's from user's GitHub profile!
Branch     JonathanLopes404:fix/issue-62874 -> nodejs:main
Labels     crypto, author ready, needs-ci, commit-queue-squash
Commits    3
 - crypto: reject inherited key type names
 - crypto: add __proto__ null to nidOnlyKeyPairs
 - crypto: fix lint errors
Committers 1
 - Jonathan <jonathan15989@protonmail.com>
PR-URL: https://github.com/nodejs/node/pull/62875
Fixes: https://github.com/nodejs/node/issues/62874
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/62875
Fixes: https://github.com/nodejs/node/issues/62874
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
--------------------------------------------------------------------------------
   β„Ή  This PR was created on Tue, 21 Apr 2026 16:16:54 GMT
   βœ”  Approvals: 2
   βœ”  - Anna Henningsen (@addaleax): https://github.com/nodejs/node/pull/62875#pullrequestreview-4149384071
   βœ”  - Filip Skokan (@panva) (TSC): https://github.com/nodejs/node/pull/62875#pullrequestreview-4149430105
   βœ”  Last GitHub CI successful
   β„Ή  Last Full PR CI on 2026-04-21T18:24:07Z: https://ci.nodejs.org/job/node-test-pull-request/72834/
- Querying data for job/node-test-pull-request/72834/
βœ”  Build data downloaded
   βœ”  Last Jenkins CI successful
--------------------------------------------------------------------------------
   βœ”  No git cherry-pick in progress
   βœ”  No git am in progress
   βœ”  No git rebase in progress
--------------------------------------------------------------------------------
- Bringing origin/main up to date...
From https://github.com/nodejs/node
 * branch                  main       -> FETCH_HEAD
βœ”  origin/main is now up-to-date
- Downloading patch for 62875
error: RPC failed; HTTP 500 curl 22 The requested URL returned error: 500
fatal: expected flush after ref listing
https://github.com/nodejs/node/actions/runs/24847374924

@panva panva added commit-queue Add this label to land a pull request using GitHub Actions. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels Apr 23, 2026
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 23, 2026
@nodejs-github-bot nodejs-github-bot merged commit 800f582 into nodejs:main Apr 23, 2026
79 checks passed
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Landed in 800f582

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. crypto Issues and PRs related to the crypto subsystem. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hard crash in generateKeyPair on bad type

4 participants